#!/usr/bin/perl

our $ip = shift;

die "Usage: $0 ip\n" if(!defined $ip);

p("I`m just debugging program hello!\n");


for (1..5)
{
    p("Captured flag: $_ :)\n");
    $ip =~ /^\d+\.(\d+)\.\d/;
    p("Sleeping $1\n");
    print ("FLAG $ip $_\n");
    sleep ($1%5);
}
exit(0);

sub p
{
    print STDERR "$ip : " . shift;
}
